From 7c92db56e023d20be00bb60a4d0e5814e9f334d7 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sun, 20 Jun 1993 08:48:58 +0000 Subject: [PATCH] (verify_interval_modification): Don't just test Qread_only prop; use INTERVAL_WRITABLE_P. --- src/intervals.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/intervals.c b/src/intervals.c index a737e9dceef..3d30e21c3ee 100644 --- a/src/intervals.c +++ b/src/intervals.c @@ -1479,21 +1479,22 @@ verify_interval_modification (buf, start, end) if (NULL_INTERVAL_P (prev)) { - after = textget (i->plist, Qread_only); - if (! NILP (after)) + if (! INTERVAL_WRITABLE_P (i)) error ("Attempt to insert within read-only text"); } else if (NULL_INTERVAL_P (i)) { - before = textget (prev->plist, Qread_only); - if (! NILP (before)) + if (! INTERVAL_WRITABLE_P (prev)) error ("Attempt to insert within read-only text"); } else { before = textget (prev->plist, Qread_only); after = textget (i->plist, Qread_only); - if (! NILP (before) && EQ (before, after)) + if (! NILP (before) && EQ (before, after) + /* This checks Vinhibit_read_only properly + for the common value of the read-only property. */ + && ! INTERVAL_WRITABLE_P (i)) error ("Attempt to insert within read-only text"); } -- 2.30.2